/*********************************************************************
							global definition
*********************************************************************/
`ifndef	DEFINE_H
	`define	DEFINE_H

 `define				LOCAL									5'b00001
 `define 			EAST									5'b00010
 `define 			NORTH									5'b00100
 `define 			WEAST									5'b01000
 `define 			SOUTH									5'b10000
 
  `define			HDR_FLIT								2'b10
  `define			BODY_FLIT							2'b00
  `define			TAIL_FLIT							2'b01
 
 
 `define 			FLIT_HDR_FLG_LOC				 	FLIT_WIDTH-1
 `define 			FLIT_TAIL_FLAG_LOC			 	FLIT_WIDTH-2
 `define 			FLIT_IN_VC_START					FLIT_WIDTH-FLIT_TYPE_WIDTH-1	

 `define 			FLIT_IN_PORT_SEL_START			`FLIT_IN_VC_START-VC_NUM_PER_PORT
 `define 			FLIT_IN_X_DES_START				`FLIT_IN_PORT_SEL_START-PORT_NUM	
 `define 			FLIT_IN_Y_DES_START				`FLIT_IN_X_DES_START-X_NODE_NUM_WIDTH	
 `define				FLIT_IN_Y_DES_END					`FLIT_IN_Y_DES_START-Y_NODE_NUM_WIDTH	

 `define				FLIT_IN_TYPE_LOC					`FLIT_HDR_FLG_LOC				:		`FLIT_IN_VC_START+1
 `define 			FLIT_IN_VC_LOC						`FLIT_IN_VC_START				:		`FLIT_IN_PORT_SEL_START+1				
 `define 			FLIT_IN_PORT_SEL_LOC				`FLIT_IN_PORT_SEL_START		:		`FLIT_IN_X_DES_START+1
 `define 			FLIT_IN_X_DES_LOC					`FLIT_IN_X_DES_START			:		`FLIT_IN_Y_DES_START+1		
 `define 			FLIT_IN_Y_DES_LOC					`FLIT_IN_Y_DES_START			:		`FLIT_IN_Y_DES_END+1			

 `define 			FLIT_IN_PYLD_LOC					`FLIT_IN_PORT_SEL_START		:		0
 `define 			FLIT_IN_AFTER_PORT_LOC			`FLIT_IN_X_DES_START			:		0
	
 `define				PROG_SEQ_WIDTH						4
 `define				PROG_SEQ_NUM						4'b1010
 `define				PROG_SEQ_LOC						`PROG_SEQ_WIDTH-1				:		0						
 
 	
	
 

 `define LOG2	function integer log2;\
      input integer number;	begin	\
         log2=0;	\
         while(2**log2<number) begin	\
            log2=log2+1;	\
         end	\
      end	\
   endfunction // log2 

module tt(input a, output b);
	assign b=a;
endmodule

`endif


